const express = require("express");

const materialController = require("../controller/materialController");

const router = express.Router({ mergeParams: true });

router
  .route("/")
  .get(materialController.getAllMaterial)
  .post(materialController.createMaterial);

router
  .route("/:id")
  .get(materialController.getMaterialById)
  .delete(materialController.deleteMaterial)
  .patch(materialController.updateMaterial);

module.exports = router;
